Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] New DataProcessor: ExtractPropertyProcessor #544

Conversation

kitzberger
Copy link
Contributor

@kitzberger kitzberger commented Jan 30, 2023

This could be used to reduce the ogImage property from an array to a simple string.

lib.meta.fields.ogImage = TEXT
lib.meta.fields.ogImage {
   dataProcessing {
      # Use the column 'og_image' to render an array with all relevant
      # information (such as the publicUrl)
      10 = FriendsOfTYPO3\Headless\DataProcessing\FilesProcessor
      10.as = media
      10.references.fieldName = og_image
      10.processingConfiguration.returnFlattenObject = 1

      # Extract only property 'publicUrl' from the above created array
      20 = FriendsOfTYPO3\Headless\DataProcessing\ExtractPropertyProcessor
      20.key = media.publicUrl
      20.as = media
   }
}

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4042415372

  • 0 of 14 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 59.719%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/DataProcessing/ExtractPropertyProcessor.php 0 14 0.0%
Totals Coverage Status
Change from base Build 4014243043: -0.7%
Covered Lines: 679
Relevant Lines: 1137

💛 - Coveralls

@schloram
Copy link
Contributor

I think this could come in handy. 👍

@lukaszuznanski lukaszuznanski merged commit 1549543 into TYPO3-Headless:master May 9, 2024
@kitzberger kitzberger deleted the extract-property-dataprocessor branch May 10, 2024 11:28
@kitzberger
Copy link
Contributor Author

Yeah, thanks for merging 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants